home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.image.ImageObserver;
- import java.net.URL;
- import java.util.StringTokenizer;
-
- class ImageMapArea implements ImageObserver {
- ImageMap parent;
- // $FF: renamed from: X int
- int field_0;
- // $FF: renamed from: Y int
- int field_1;
- // $FF: renamed from: W int
- int field_2;
- // $FF: renamed from: H int
- int field_3;
- boolean entered = false;
- boolean active = false;
- boolean terminal = true;
- Image hlImage;
-
- public void init(ImageMap parent, String args) {
- this.parent = parent;
- StringTokenizer st = new StringTokenizer(args, ", ");
- this.field_0 = Integer.parseInt(st.nextToken());
- this.field_1 = Integer.parseInt(st.nextToken());
- this.field_2 = Integer.parseInt(st.nextToken());
- this.field_3 = Integer.parseInt(st.nextToken());
- if (st.hasMoreTokens()) {
- this.handleArg(st.nextToken(""));
- } else {
- this.handleArg((String)null);
- }
-
- this.makeImages();
- }
-
- public void handleArg(String s) {
- }
-
- public void setHighlight(Image img) {
- this.hlImage = img;
- }
-
- public void makeImages() {
- this.setHighlight(this.parent.getHighlight(this.field_0, this.field_1, this.field_2, this.field_3));
- }
-
- public boolean inside(int x, int y) {
- return x >= this.field_0 && x < this.field_0 + this.field_2 && y >= this.field_1 && y < this.field_1 + this.field_3;
- }
-
- public void drawImage(Graphics g, Image img, int imgx, int imgy, int x, int y, int w, int h) {
- Graphics ng = g.create();
- ng.clipRect(x, y, w, h);
- ng.drawImage(img, imgx, imgy, this);
- }
-
- public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {
- return img == this.hlImage ? this.parent.imageUpdate(img, infoflags, x + this.field_0, y + this.field_1, width, height) : false;
- }
-
- public void showStatus(String msg) {
- this.parent.getAppletContext().showStatus(msg);
- }
-
- public void showDocument(URL u) {
- this.parent.getAppletContext().showDocument(u);
- }
-
- public void highlight(Graphics g, boolean on) {
- if (on) {
- g.drawImage(this.hlImage, this.field_0, this.field_1, this);
- } else {
- this.drawImage(g, this.parent.baseImage, 0, 0, this.field_0, this.field_1, this.field_2, this.field_3);
- }
- }
-
- public void setState(Graphics g, boolean on) {
- this.highlight(g, on);
- this.active = on;
- }
-
- public void press(int x, int y) {
- this.press();
- }
-
- public void press() {
- }
-
- public void lift(int x, int y) {
- this.lift();
- }
-
- public void lift() {
- }
-
- public void drag(int x, int y) {
- }
-
- public ImageMapArea() {
- }
- }
-